﻿using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
      
        ArrayList carga;
        ArrayList barc;
        ArrayList fec;
        ArrayList puerto;
        int i=0;
        public Form1()
        {
            InitializeComponent();
            carga = new ArrayList();
            barc = new ArrayList();
            fec = new ArrayList();
            puerto = new ArrayList();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            
        }

        private void button1_Click(object sender, EventArgs e)
        {
            
            string barcos = textBox1.Text;
            string puertos = textBox2.Text;
            
        }

        private void button2_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "")
            {
                MessageBox.Show("Ingrese la cantidad de barcos");
                return;
            }
            if (textBox2.Text == "")
            {
                MessageBox.Show("Ingrese la cantidad de Puertos");
                return;
            }
            if (textBox3.Text  == "")
            {   MessageBox.Show("Ingrese el Barco");
                return;
            }
            if (textBox4.Text == "")
            { MessageBox.Show("Ingrese el Puerto");
                return;
            }
            if (textBox4.Text == "")
            { MessageBox.Show("Ingrese La Carga");
            return;
            }

            dataGridView1.Rows.Add();
            i = i + 1;
            textBox3.Text = "";
            textBox4.Text = "";
            textBox5.Text = "";
        }

        private void button1_Click_1(object sender, EventArgs e)
        {
            //foreach (DataGridViewRow item in dataGridView1.Rows)
            /*{
                int x = item.Index;*/
                dataGridView1.Rows.RemoveAt(0);
            //}
 
        }

        private void button3_Click(object sender, EventArgs e)
        {
          

        }

        private void button3_Click_1(object sender, EventArgs e)
        {
           Reporte rp = new Reporte();
            rp.Show();
            this.Hide();

        }

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }
    }
}
